package com.hc.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author hecai
 * 用户地址表
 */

@ApiModel(value = "用户地址表")
@Getter
@Setter
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_user_addr")
public class UserAddr implements Serializable {
    private static final long serialVersionUID = 43280486421060944L;
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = " 编号")
    private Long id;
    /**
     * 县区编号
     */
    @TableField(value = "country_id")
    @ApiModelProperty(value = " 县区编号")
    private Integer countryId;
    /**
     * 具体地址
     */
    @TableField(value = "addr")
    @ApiModelProperty(value = " 具体地址")
    private String addr;
    /**
     * 用户编号
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = " 用户编号")
    private Long userId;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;
    /**
     * 是否是默认：0不是默认，1是默认
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "是否是默认：0不是默认，1是默认")
    private Boolean isDefault;
}